package com.bawei.home.api

import com.bawei.network.HttpInterceptorType
import com.bawei.network.HttpManager
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import javax.inject.Singleton

@Module //声明Hilt模块
@InstallIn(SingletonComponent::class) //声明当前模块被注入应用内所有对象中
object HomeServerModule {

    @Provides
    @Singleton
    fun getHomeServerApi(): HomeServerApi{
        return HttpManager.createApiServer(HomeServerApi::class.java, HttpInterceptorType.INTERCEPTOR)
    }



}